package org.dromara.mall.domain.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.mall.domain.MallGoodsSpec;
import org.dromara.mall.domain.MallGoodsSpecVal;

import java.util.List;


/**
 * 商品规格对象 mall_goods_spec
 *
 * @author Mr Lei
 * @date 2024-05-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = MallGoodsSpec.class,reverseConvertGenerate = false)
public class MallGoodsSpecBo extends BaseEntity {


    /* id */
    @NotNull(message = "ID不能为空", groups = { EditGroup.class })
    private Long id;

    /* 规格名称 */
    private String name;

    /*商品分类*/
    private Long cateId;

    /*商品id*/
    private Long goodsId;

    /*商品属性值*/
    @TableField(exist = false)
    private List<MallGoodsSpecVal> specValues;



}
